# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=ksirk
pkgver=24.08.2
pkgrel=0
pkgdesc="A computerised version of the well known strategic board game Risk"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://apps.kde.org/en-gb/ksirk/"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kcompletion-dev
	kconfig-dev
	kconfigwidgets-dev
	kcoreaddons-dev
	kcrash-dev
	kdoctools-dev
	ki18n-dev
	kio-dev
	knewstuff-dev
	kwallet-dev
	kwidgetsaddons-dev
	kxmlgui-dev
	libkdegames-dev
	qca-dev
	qt6-qtbase-dev
	qt6-qtmultimedia-dev
	qt6-qtsvg-dev
	samurai
	"
_repo_url="https://invent.kde.org/games/ksirk.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/ksirk-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DWITH_JABBER_SUPPORT=OFF # xmpp support isn't Qt6 compatible
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
d87d3f692bc5f87a518c4bb33e313b8fd382d963e243ce361110251dd663062fa4ca7f61c1d29b16b703eac4aec9fc9be9c6839f5c0406bffc90ea2d6588ab7e  ksirk-24.08.2.tar.xz
"
